package com.yky.service.impl;

import cn.dev33.satoken.stp.StpInterface;
import com.yky.service.sys.SysPermissionService;
import com.yky.service.sys.SysRoleAccountService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * 业务聚合
 *
 * @version [V2.0]
 * @package com.example.sso.server.service.impl;
 * @description:[用一句话描述该文件做什么]
 * @author: [zhuben]
 * @date: [2024-02-21 10:01]
 * @copyright: 2024 echovin.com
 */

@Service
public class StpInterfaceImpl implements StpInterface {
    @Resource
    private SysRoleAccountService sysRoleAccountService;
    @Resource
    private SysPermissionService sysPermissionService;

    @Override
    public List<String> getPermissionList(Object loginId, String loginType) {
        return sysPermissionService.getAccountPermissionList((String)loginId);
    }

    @Override
    public List<String> getRoleList(Object loginId, String loginType) {
        return sysRoleAccountService.getAccountRoleList((String)loginId);
    }
}
